import { request } from '@/api/service'

export default {
  getRepositoryList (params) {
    return request({
      url: '/api/repository/page',
      method: 'get',
      params
    })
  },
  addRepository (data) {
    return request({
      url: '/api/repository/add',
      method: 'post',
      data
    })
  },
  updateRepository (data) {
    return request({
      url: '/api/repository/update',
      method: 'post',
      data
    })
  },
  deleteRepository (id) {
    return request({
      url: '/api/repository/delete',
      method: 'post',
      data: {
        id
      }
    })
  },
  // 查看每个仓库的存储情况
  getRepository (id) {
    return request({
      url: `/api/repository/get?id=${id}`,
      method: 'get'
    })
  }
}
